package com.zst.demo2.service.impl;

import com.zst.demo2.mapper.UserRoleMapper;
import com.zst.demo2.po.UserRolePO;
import com.zst.demo2.service.IUserRoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
@Slf4j
public class UserRoleServiceImpl implements IUserRoleService {
    @Autowired
    UserRoleMapper userRoleMapper;

    @Override
    public Optional<UserRolePO> getUserRoleById(Long userId) {
        UserRolePO userRolePO = userRoleMapper.selectById(userId);
        return Optional.of(userRolePO);
    }
}
